<!DOCTYPE html>
<html lang="en"><html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>论坛</title>
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <link rel="stylesheet" href="css/bootstrap-theme.min.css">
    <link rel="stylesheet" href="css/communtiy.css">
    <script src="https://www.jq22.com/jquery/jquery-3.3.1.js"></script>
    <script src="js/bootstrap.min.js" type="application/javascript"></script>
    <!--滚动公告-->
    <script src="js/txtscroll.js" type="application/javascript"></script>
    <link rel="stylesheet" href="css/gundong.css">


</head>
<script type="application/javascript">
    //<!--用户未登录就进行回复,登录成功后给他饭还回复的页面-->
    window.onload=function () {
        var closable=window.localStorage.getItem("closeble");
        if(closable=="true"){
            window.close();
            window.localStorage.removeItem("closeble");
        }
    }

</script>

<body>
<!--插入表头共同片段-->
<div th:insert="~{navaigation::nav}"></div>
<div class="txt-scroll">
    <div class="scrollbox">
        <div class="txt">
            欢迎你使用该论坛，希望你是用的愉快。以下要注意一些，
           1.本论坛适合电脑端使用，手机版本可能模版布局不兼容。
            2.不登录的用户只可以查看文章操作。如果你想使用更多的功能请去登录，将会用更多功能等着你发现。
            3.在使用中发现bug欢迎 留言到937958191@qq.com邮箱
        </div>
    </div>
</div>

<!--//问题首页-->
<div class="container-fluid main" >
    <div class="row">
        <div class="col-lg-9 col-md-12 col-sm-12 col-xs-12">
            <h3> <span class="glyphicon glyphicon-list" aria-hidden="true">问题列表</span></h3>
            <ul class="nav nav-tabs">
                <li role="presentation" th:class="${sort=='hot'?'active':''}">
                    <a href="/?sort=hot">最热</a>
                </li>
                <li role="presentation" th:class="${sort=='hot30'?'active':''}">
                    <a href="/?sort=hot1">昨天最热</a>
                </li>
                <li role="presentation" th:class="${sort=='hot7'?'active':''}">
                    <a href="/?sort=hot7">7天最热</a>
                </li>
                <li role="presentation" th:class="${sort=='new'?'active':''}">
                    <a href="/?sort=new">最新</a>
                </li>
                <li role="presentation" th:class="${sort=='no'?'active':''}">
                    <a href="/?sort=no">消灭零回复</a>
                </li>
            </ul>
            <hr>

            <div class="media queison-tops" th:each="quesionUserDto:${paginationDto.quesionUserDtos}">
                <div class="media-left">
                    <a th:if="${session.user!=null}" th:href="@{'/othermes/'+${quesionUserDto.getUsers().getId()}}">
                        <img class="media-object img-thumbnail" th:src="${quesionUserDto.getUsers().getAvatarUrl()}"  style="height: 50px;width: 50px;">
                    </a>

                    <a th:if="${session.user==null}"href="#">
                        <img class="media-object img-thumbnail" th:src="${quesionUserDto.getUsers().getAvatarUrl()}"  style="height: 50px;width: 50px;">
                    </a>
                </div>
                <div class="media-body">
                    <h3 class="media-heading" >
                        <a th:href="@{'/quesion/'+${quesionUserDto.getId()}}" th:text="${quesionUserDto.getTitle()}"></a>
                    </h3>
                    <b>
                    <span class="text-desc"><span th:text="${quesionUserDto.getUsers().getName()}"></span>发表了文章 •
                        <span th:text="${quesionUserDto.getComment_count()}"></span> 个评论 •
                        <span th:text="${quesionUserDto.getView_count()}"></span> 次浏览 •
                        <span th:text="${#dates.format(quesionUserDto.getGmt_create(),'yyyy-MM-dd HH:mm')}"></span>
                    </span>
                    </b>
                </div>
            </div>
            <!--分页-->
            <nav aria-label="Page navigation" th:if="${paginationDto.getIsSerach()==null}">
                <ul class="pagination">
                    <li th:if="${paginationDto.page>1}">
                        <a th:href="@{/(page=1,sort=${sort})}" aria-label="Previous">
                            <span aria-hidden="true">&laquo;</span>
                        </a>
                    </li>
                    <li th:each="pages:${paginationDto.pages}"  th:class="${paginationDto.page==pages}?'active':''">
                        <a th:text="${pages}" th:href="@{/(page=${pages},sort=${sort})}"></a>
                    </li>

                    <li th:if="${paginationDto.page<paginationDto.getCountPage()}">
                        <a th:href="@{/(page=${paginationDto.getCountPage()},sort=${sort})}" aria-label="Next">
                            <span aria-hidden="true">&raquo;</span>
                        </a>
                    </li>
                </ul>
            </nav>
        </div>


        <div class="col-lg-3 col-md-12 col-sm-12 col-sm-12 col-xs-12">
            <h3>热门话题</h3>
            <ul class="hot-qeusion">
                <li th:each="connect:${hotQuesions}">
                    <a th:href="@{'/quesion/'+${connect.getId()}}" th:text="${connect.getTitle()}"></a>
                    <span style="font-size: 5px;color: #999999" class="glyphicon glyphicon-time" aria-hidden="true">
                            <span th:text="${#dates.format(connect.getGmt_create(),'yyyy-MM-dd')}"></span>
                        </span>
                </li>
            </ul>
            <hr class="col-lg-12 col-md-12 col-sm-12 col-sm-12 col-xs-12">
            <div class="col-lg-12 col-md-12 col-sm-12 col-sm-12 col-xs-12">
                <div class="col-lg-5 col-md-12 col-sm-12 col-sm-12 col-xs-12">
                    <h3>社区之星</h3>
                </div>
                <div class="col-lg-7 col-md-12 col-sm-12 col-sm-12 col-xs-12">
                    <span style="margin-top: 25px;color: #5908f9" class="glyphicon glyphicon-refresh"aria-hidden="true">每天凌晨1点自动涮新</span>
                </div>
            </div>
            <!---排行资料-->
            <div class="col-lg-12 col-md-12 col-sm-12 col-sm-12 col-xs-12">
                <div class="div_scroll" style="overflow-x: hidden;height: 270px;" >
                    <div class="col-lg-12 col-md-12 col-sm-12 col-sm-12 col-xs-12" th:each="ranking,rankingsize:${rankIngUsers}"style="margin-top: 20px;">

                       <img th:if="${rankingsize.index+1==1}" src="/img/one.png" style="height: 30px;width: 30px;">
                        <img th:if="${rankingsize.index+1==2}" src="/img/two.png" style="height: 30px;width: 30px;">
                        <img th:if="${rankingsize.index+1==3}" src="/img/three.png" style="height: 30px;width: 30px;">
                        <b th:if="${rankingsize.index+1>3}" th:text="${rankingsize.index+1}" style="margin-right: 15px;"></b>

                        <img  class="img-circle" th:src="${ranking.getAvatarUrl()}" style="height: 35px;width: 35px;">
                       <span> <span th:text="${ranking.getName()}"style="margin-right: 10px;"></span></span>
                       <span>Lv:<span th:text="${ranking.getLeave()}"style="margin-right: 10px;"></span></span>
                        <span>称谓:<span th:text="${ranking.getChenwei()}"></span></span>
                    </div>

                </div>
            </div>
           <!-- <div>
                <span >
                      <img th:src="${session.user.getAvatarUrl()}" style="height: 50px;width: 50px;">
                    <span th:text="${session.user.getName()}"></span>
                    <span>粉丝</span>
               </span>
            </div>-->
            <hr class="col-lg-12 col-md-12 col-sm-12 col-sm-12 col-xs-12">
            <h3>BUG反馈方式</h3>
            <div class="col-lg-6 col-md-12 col-sm-12 col-sm-12 col-xs-12">
                <a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=937958191&site=qq&menu=yes">
                    <img border="0" src="http://wpa.qq.com/pa?p=2:937958191:53" alt="点击这里像我反馈BUG" title="点击这里像我反馈BUG"/>
                </a>
            </div>
            <div class="col-lg-6 col-md-12 col-sm-12 col-sm-12 col-xs-12">
                <img  src="/img/qq.jpg" style="width: 150px;height: 150px;text-align: center">
                <h4>站长的微信</h4>
            </div>
            <hr class="col-lg-12 col-md-12 col-sm-12 col-sm-12 col-xs-12">
        </div>
    </div>


</div>
<div class="container-fluid">
    <div class="col-lg-9 col-md-12 col-sm-12 col-sm-12 col-xs-12">
        <h4 style="color: #666666;text-align: center">如果在使用中遇到什么问题或者bug欢迎留言,937958191@qq.com</h4>
    </div>
    <div class="col-lg-3 col-md-12 col-sm-12 col-sm-12 col-xs-12">
        <h5 >                <a target="_blank" href="//shang.qq.com/wpa/qunwpa?idkey=05b464bd5b1b475e78c14608d5122dfe7ddbee30255308e24bf64bcb3104d834"><img border="0" src="//pub.idqqimg.com/wpa/images/group.png" alt="测试" title="测试"></a>
        </h5>
    </div>
</div>
</body>
<script>
    //搜索

    $('.txt-scroll').txtscroll({ 'speed': 20 });

    $(".lianhe_seach").keyup(function (){
       var inputMes =$(".lianhe_seach").val();
       $.get("/searchValue",{"inputMes":inputMes},function (data) {
           console.log(data.length)
           if(data.length!=0){
               $("#apeendChoice").empty();
               for(var i=0;i<data.length;i++){
                   $("#apeendChoice").append("<li><b><a href='#' onclick='getSlectValues(this)' style='color: black;margin-top: 10px;font-size: 15px;'>"+data[i].title+"</a></b></li>" +
                       "<br>")
               }
           }else {
               $("#apeendChoice").append("");

           }
       });


    });
    function getSlectValues(e) {
        var text = $(e).text();
        $(".lianhe_seach").val(text);
    }
</script>
</html>